/* 翻译弹窗样式 */
#translation-popup {
  position: fixed;
  top: 100px;
  left: 100px;
  width: 320px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  display: none;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.translation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  border-radius: 8px 8px 0 0;
}

.translation-title {
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.translation-actions {
  display: flex;
  gap: 8px;
}

.translation-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.translation-actions button:hover {
  background: #f0f0f0;
  color: #333;
}

.translation-actions button:active {
  transform: scale(0.95);
}

.favorite-btn svg {
  transition: fill 0.2s ease;
}

.favorite-btn:hover svg {
  fill: #ffd700;
}

.copy-btn:hover {
  color: #4CAF50;
}

.close-btn:hover {
  color: #f44336;
}

.translation-content {
  padding: 16px;
}

.original-text {
  font-size: 15px;
  color: #333;
  margin-bottom: 8px;
  word-wrap: break-word;
  line-height: 1.5;
}

.translated-text {
  font-size: 15px;
  color: #2196F3;
  font-weight: 500;
  margin-bottom: 12px;
  word-wrap: break-word;
  line-height: 1.5;
}

.translation-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.service-name {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
}

.translation-time {
  color: #999;
}

/* 响应式设计 */
@media (max-width: 480px) {
  #translation-popup {
    width: calc(100vw - 20px);
    left: 10px !important;
    right: 10px;
  }
  
  .translation-content {
    padding: 12px;
  }
  
  .translation-header {
    padding: 10px 12px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  #translation-popup {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
  }
  
  .translation-header {
    background: #3d3d3d;
    border-bottom-color: #444;
  }
  
  .translation-title {
    color: #e0e0e0;
  }
  
  .translation-actions button {
    color: #bbb;
  }
  
  .translation-actions button:hover {
    background: #444;
    color: #e0e0e0;
  }
  
  .original-text {
    color: #e0e0e0;
  }
  
  .translated-text {
    color: #64b5f6;
  }
  
  .translation-info {
    border-top-color: #444;
    color: #bbb;
  }
  
  .service-name {
    background: #1e3a5f;
    color: #64b5f6;
  }
} 